package com.chen.controller;

import com.chen.mapper.UserMapper;
import com.chen.service.UserService;
import com.chen.utils.Result;
import org.springframework.web.bind.annotation.*;

import javax.annotation.PostConstruct;
import javax.annotation.Resource;

@CrossOrigin
@RestController
@RequestMapping("/vx")
public class VxController {

    @Resource
    UserService userService;


   @PostMapping("/login")
    public Result vxLogin(String code){
       return userService.vxLogin(code);
   }
    @PostMapping("/getPhoneRegister")
    public Result getPhoneRegister( String phoneCode,
                                   String code
    ){
        return userService.getPhoneRegister(code,phoneCode);
    }
}
